Delete Template
Features Details:
Delete WA Template API is used by enterprise to delete WA template programmatically. The user will provide WA Template details which includes- Header, templateID, TemplateName and WabaId.
Authorization Mechanism- Token based authentication mechanism will be used for authorizing user to delete the WA template. Please refer 'Getting Started - Before You Start' section for more details.
After getting the access token, Enterprises can delete template using following API.
NOTE : please visit 'Template Management API - Get Template' section for getting templates.
Delete template by name:
Deleting a template by name deletes all templates that match that name (meaning templates with the same name but different languages will also be deleted).
API Endpoint:
UAT endpoint- https://apiuat.aclwhatsapp.com/access-api/v1/wa/{waba-id}/deleteTemplate/:name
Production endpoint- https://api.aclwhatsapp.com/access-api/v1/wa/{waba-id}/deleteTemplate/:name
Request Type: GET
Sample Curl Request
curl --location 'https://apiuat.aclwhatsapp.com/access-api/v1/wa/{waba-id}/deleteTemplate/:name' \
--header 'Authorization: Bearer <token>'
Header Values
Attribute | Description |
---|---|
Authorization | Bearer token - Access token. |
Parameter Description -
- name - name of the particular template.
Sample success Response
Payload
{
"success": true
}
Sample failure Response
Payload
{
"message": "Invalid parameter",
"type": "OAuthException",
"code": 100,
"error_subcode": 2593002,
"is_transient": false,
"error_user_title": "Message template not found",
"error_user_msg": "The message template {template_name} wasn't found for this account.",
"fbtrace_id": "{unique_id}"
}
Delete template by id:
To delete a template by ID, include the template's ID along with its name in your request; only the template with the matching template ID will be deleted.
API Endpoint:
UAT endpoint- https://apiuat.aclwhatsapp.com/access-api/v1/wa/{waba-id}/deleteTemplate/:name?hsm_id={HSM_ID}
Production endpoint- https://api.aclwhatsapp.com/access-api/v1/wa/{waba-id}/deleteTemplate/:name?hsm_id={HSM_ID}
Request Type: GET
Sample Curl Request
curl --location 'https://apiuat.aclwhatsapp.com/access-api/v1/wa/{waba-id}/deleteTemplate/:name?hsm_id={HSM_ID}' \
--header 'Authorization: Bearer <token>'
Header Values
Attribute | Description |
---|---|
Authorization | Bearer token - Access token. |
Parameter Description-
- name — name of the template.
- hsm_id — id of the template.
Sample success Response
Payload
{
"success": true
}
Sample failure Response
Payload
{
"message": "Invalid parameter",
"type": "OAuthException",
"code": 100,
"error_subcode": 2593002,
"is_transient": false,
"error_user_title": "Message template not found",
"error_user_msg": "The message template {template_name} wasn't found for this account.",
"fbtrace_id": "{unique_id}"
}
Security Requirements
· APIs should be HTTPS supported with version TLS v1.2
· Customer data should be logically segregated as per user roles defined.
*Please refer Meta Documentation for more details: https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates/ *